//
//  PTCoreManager.h
//  PlanTech
//
//  Created by ruifeng song on 2018/7/16.
//  Copyright © 2018年  androidlongs. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void (^PTRESTfulCompletionHandler)(id __nullable retObject, NSError * __nullable retError);

@interface PTCoreManager : NSObject

+ (nonnull instancetype)shareInstance;

/**
 执行 REST 接口
 
 @param  uri    REST接口URI
 @param  method   HTTP Method
 @param  header   HTTP Header
 @param  parameters  HTTP Parameters
 @param  resultClass 序列化对象类型
 @param  completion  回调Block
 */
-(void)executeRESTfulTaskWithURI:(NSString *)uri
                                                      Method:(nonnull const NSString *)method
                                                      Header:(nullable NSDictionary *)header
                                                  Parameters:(nullable NSDictionary *)parameters
                                                 ResultClass:(nullable Class)resultClass
                                                  Completion:(nullable PTRESTfulCompletionHandler)completion;

@end
